package ws

import (
	"github.com/gorilla/websocket"
	"net/http"
)

var upgrader *websocket.Upgrader

//房间
var Room = &ChatRoom{
	members: make(map[string][]*Visitor),
}

func init() {
	upgrader = &websocket.Upgrader{
		ReadBufferSize:  1024,
		WriteBufferSize: 1024,
		// 解决跨域问题
		CheckOrigin: func(r *http.Request) bool {
			return true
		},
	}
}
